$file = $ARGV[0];

open(INFILE, "<$file") or die "could not open infile.";

while(<INFILE>) {
	$line = $_;
	chomp($line);

	if($line =~ /^[\*\[#]/) {
		next;
	}

	if($line =~ /.+##.+/) {
		#print $line . "\n";
		

		my @tokens = split(/##/, $line);
		if($#tokens >= 1) {
			my @features = split(/,/, $tokens[0]);
			for(my $i=0; $i<=$#features; $i++) {
				my $feature = $features[$i];
				$feature = lc($feature);
				$feature =~ s/\[[\+\-0-9a-zA-Z]+\]//g;
				$feature =~ s/^[ ]+//;			

				print $feature . "\n";
			}
		}
	}
}
